import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_module/util/log_u.dart';

class CustomBlocObserver extends BlocObserver {
  const CustomBlocObserver();

  @override
  void onTransition(
    Bloc<dynamic, dynamic> bloc,
    Transition<dynamic, dynamic> transition,
  ) {
    super.onTransition(bloc, transition);
    LogU.log("CustomBlocObserver transition ---> $transition");
  }

  @override
  void onError(BlocBase<dynamic> bloc, Object error, StackTrace stackTrace) {
    super.onError(bloc, error, stackTrace);
    LogU.log("CustomBlocObserver error ---> $error");
  }

}
